<template>
  <div>
    <div class="function-area">
      <div class="function-title-area">
        <div class="function-area-title-piece"></div>
        <div class="function-area-title">分享设置</div>
      </div>
      <el-divider></el-divider>
      <div class="share-card">
        <span class="share-card-tile">分享卡片</span>
        <span class="share-card-desc">通过小程序功能分享给好友或群的样式</span>
      </div>
      <div class="custom-area">
        <div class="custom-share">
          <p class="custom-share-title">分享卡片文案</p>
          <el-input v-model="share_config.share_desc" placeholder="请输入分享文案" maxlength="27" show-word-limit></el-input>
        </div>
        <div class="custom-staff-share">
          <span class="custom-staff-share-title">显示员工姓名</span>
          <span class="custom-staff-share-desc">若分享关联员工数据，文案内会显示员工姓名</span>
          <span class="custom-staff-share-switch"><el-switch v-model="share_config.is_share_staff"></el-switch></span>
        </div>
        <div class="upload-cover">
          <div class="upload-cover-title">上传卡片封面</div>
          <div class="upload-cover-upload">
            <SingleImageUpload :isShowTip="false" v-model="share_config.cover"/>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "ShareConfig",
  props: ['share_config']
}
</script>

<style lang="scss" scoped>
::v-deep .el-divider--horizontal {
  margin: 5px;
}

::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}

.function-area {
  margin-top: 10px;
  margin-left: 10px;
  .function-title-area {
    display: flex;
    position: relative;

    .function-area-title-piece {
      width: 5px;
      height: 30px;
      background-color: #2254f5;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
    }

    .function-area-title {
      width: 100%;
      height: 40px;
      font-size: 18px;
      font-weight: bold;
      color: #2254f5;
      padding-left: 10px;
      align-content: center;
    }
  }
  .share-card {
    margin: 20px 0;
    .share-card-tile {
      font-size: 14px;
      font-weight: bold;
    }
    .share-card-desc {
      padding-left: 10px;
      font-size: 12px;
      color: rgba(0,0,0,0.5);
    }
  }
  .custom-area {
    width: 100%;
    height: auto;
    padding: 10px;
    background-color: #f6f7f9;
    border-radius: 5px;
    .custom-staff-share {
      position: relative;
      margin-bottom: 20px;
      .custom-staff-share-title {
        font-size: 14px;
        font-weight: bold;
      }
      .custom-staff-share-desc {
        font-size: 12px;
        color: rgba(0,0,0,0.5);
        padding-left: 10px;
      }
      .custom-staff-share-switch {
        position: absolute;
        right: 1px;
      }
    }
    .custom-share {
      position: relative;
      margin-bottom: 20px;
      .custom-share-title {
        font-size: 14px;
        font-weight: bold;
      }
      .custom-share-desc {
        font-size: 12px;
        color: rgba(0,0,0,0.5);
        padding-left: 10px;
      }
      .custom-share-switch {
        position: absolute;
        right: 1px;
      }
    }
    .upload-cover {
      display: flex;
      margin-bottom: 10px;
      font-size: 14px;
      .upload-cover-title {
        width: 50%;
        align-content: center;
        font-weight: bold;
      }
      .upload-cover-upload {
        width: 50%;
        text-align: right;
      }
    }
    .custom-area-child {
      width: 100%;
      background-color: white;
      padding: 20px;
      margin-bottom: 20px;
      .staff-qr {
        position: relative;
        margin-bottom: 20px;
        .staff-qr-title {
          font-size: 14px;
        }
        .staff-qr-switch {
          position: absolute;
          right: 1px;
        }
        p {
          font-size: 12px;
          color: rgba(0,0,0,0.5);
          margin: 5px;
        }
      }
      .customer_server_pop {
        position: relative;
        margin-bottom: 20px;
        .customer_server_pop-title {
          font-size: 14px;
        }
        .customer_server_pop-switch {
          position: absolute;
          right: 1px;
        }
        .pop-info-input {
          padding-top: 10px;
        }
      }
    }
    .mendian-avatar {
      position: relative;
      margin-bottom: 20px;
      .mendian-avatar-title {
        font-size: 14px;
        font-weight: bold;
      }
      .mendian-avatar-desc {
        font-size: 12px;
        color: rgba(0,0,0,0.5);
        padding-left: 10px;
      }
      .mendian-avatar-switch {
        position: absolute;
        right: 1px;
      }
    }
    .mendian-avatar-upload {
      display: flex;
      margin-bottom: 20px;
      font-size: 14px;
      .mendian-avatar-upload-title {
        width: 50%;
        align-content: center;
      }
      .upload {
        width: 50%;
        text-align: right;
      }
    }
  }
}

</style>
